package com.example.mybatis_demo.controller;

import com.example.mybatis_demo.entity.UserEntity;
import com.example.mybatis_demo.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RequestMapping("/user")
@RestController
public class UserController {

    @Autowired
    private UserService userService;

    @RequestMapping("/getUser")
//    public List<UserEntity> getAll() {
//        return userService.getAll();
//    }
    public String getUser() {
        System.out.println("do getUser");
        return "user";
    }

    @RequestMapping("/deluser")
    public String delUser() {
        return "del user";
    }
}
